<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js弹出框效果</title>
<script type="text/javascript" src="/j-tool/jquery.js"></script>
<script type="text/javascript" src="/j-tool/jq_alert.js"></script>
<style type="text/css">
body,span,div,td{
	font-size:12px;
	color:#849BCA;
}

#bodyL{
	position:absolute;
	width:140px;
	bottom:250px;
	left:650px;
}
#bodyL a{
	float:left;
	margin-right:5px;
}

a.od{
	width:60px;
	height:20px;
	line-height:20px;
	text-align:center;
	font-weight:bold;
	display:block;
	color:#547BC9;
	float:left;
	text-decoration:none;
}

#msgbox .title{
	line-height:24px;
	height:24px;
	background:#EDF1F8;
	position:relative;
	padding:2px 10px;
	border-bottom: 2px solid #849BCA;
}

#msgbox p{
	font-size:12px;
	line-height:20px;
	color:#849BCA;
	margin:0 1px;
	text-indent:2em;
}

#msgbox .close{
	position:absolute;
	right:0;
	top:5px;
	width:60px;
	height:20px;
	line-height:20px;
	text-align:center;
	font-weight:bold;
	color:#547BC9;
	text-decoration:none;
}

#msgbox a.close:link{
	background:#EEF1F8;
}

#msgbox a.close:hover{
	color:red;
}

#msgbox{
	filter:alpha(opacity=100);
	opacity:1;
	overflow:hidden;
	height:0px;
	border:4px solid #EBEBEB;
	position:absolute;
}
</style>
</head>
<body>
<div id="bodyL">
	<a href="#" class="od" onclick = "Dialog.say('如果您希望有选择地执行若干代码块之一，请使用 Switch 语句。使用 Switch 语句可以避免冗长的 if..elseif..else 代码块。');">
		[打开层]
	</a>
	<a href="#" class="od" onclick = "Dialog.close();return false;">
		[关闭层]
	</a>
</div>	

<script type="text/javascript">
	var Dialog = new Dialog();
		Dialog.Init();
		
	/*-------------------------鼠标拖动---------------------*/	
	/*
	var od = document.getElementById("fd");	
	var dx,dy,mx,my,mouseD;
	var odrag;
	var isIE = document.all ? true : false;
	document.onmousedown = function(e){
		var e = e ? e : event;
		if(e.button == (document.all ? 1 : 0))
		{
			mouseD = true;			
		}
	}

	document.onmouseup = function(){
		mouseD = false;
		odrag = "";
		if(isIE)
		{
			od.releaseCapture();
			od.filters.alpha.opacity = 100;
		}
		else
		{
			window.releaseEvents(od.MOUSEMOVE);
			od.style.opacity = 1;
		}		
	}
	
	od.onmousedown = function(e){
		odrag = this;
		var e = e ? e : event;
		if(e.button == (document.all ? 1 : 0))
		{
			mx = e.clientX;
			my = e.clientY;
			od.style.left = od.offsetLeft + "px";
			od.style.top = od.offsetTop + "px";
			if(isIE)
			{
				od.setCapture();				
				od.filters.alpha.opacity = 50;
			}
			else
			{
				window.captureEvents(Event.MOUSEMOVE);
				od.style.opacity = 0.5;
			}	
		} 
	}

	document.onmousemove = function(e){
		var e = e ? e : event;
				
		if(mouseD==true && odrag)
		{		
			var mrx = e.clientX - mx;
			var mry = e.clientY - my;	
			od.style.left = parseInt(od.style.left) +mrx + "px";
			od.style.top = parseInt(od.style.top) + mry + "px";			
			mx = e.clientX;
			my = e.clientY;			
		}
	}
	*/
</script>
</body>
</html>